<template>
	<view>
	<view style="color: white;background-color: #252630;display: flex;flex-direction: column;align-items: center;padding-top: 100px;min-height:calc(100vh);position: relative;">
		<image class="logo" :src="data.icon" style="width: 120px;height: 120px;border-radius: 15px;"></image>
		<p style="font-weight: 800;font-size: 24px;margin-top: 10px;">{{data.title}}</p>
			<view style="padding: 10px 20px;text-align: center;">
				<rich-text v-if="data.content!=null&&data.content!=''" selectable :nodes="data.content" style="font-size: 14.4px;"></rich-text>
			</view>
		<view @click="down(data._id)" style="display: flex;align-items: center;background-color: black;width: 230px;height: 55px;border-radius: 100px;justify-content: center;margin-top: 55px;">
			<image src="@/static/android.png" style="width: 30px;height: 30px;margin-right: 26px;"></image>
			<p>下载({{data.size}})</p>
		</view>
		<view v-if="data.image.length!=0" style="border-radius: 20px 20px 0 0;height: 20px;background-color: white;position: absolute;bottom: 0px;width: 100%;">
		</view>
	</view>
	<view v-if="data.image.length!=0" style="position: relative;margin-bottom: 100px;">
		<view style="height: 50px;position: absolute;display: flex;align-items: center;justify-content: center;width: 100%;">
			<p v-for="(item,index) in data.image" :style="{color:current==index?'#252630':'#eeeeee',margin: '5px'}">●</p>
		</view>
		<swiper autoplay interval="3000" circular style="height: 145.6vw;margin-top: 4.266vw;position: relative;" :current="current"
			@change="change">
			<swiper-item v-for="(item,index) in data.image">
				<view style="text-align: center;margin-top: 50px;position: relative;">
					<image @click="openImg(data.image,index)" :src="item" style="width: 70vw;" mode="widthFix"></image>
				</view>
			</swiper-item>
		</swiper>
			<websitenav></websitenav>
	</view>	
	</view>
</template>

<script>
	import ase from '@/common/ar-aes/ar-aes.js'
	export default {
		props: {
			data: {
				type: Object,
				default (data) {
					return {}
				}
			}
		},
		name:"apk_black",
		data() {
			return {
				current:0,
			};
		},
		methods:{
			down(id){
				this.$emit("down",{id:id})
			},
			change(e) {
				this.current = e.detail.current
			}
		}
	}
</script>